package com.ee.chat.common.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ee.chat.common.entity.UserVip;
import com.ee.chat.common.entity.VipConfig;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.Map;

/**
 * <p>
 * Mapper接口
 * </p>
 *
 * @author Shane
 * @since 2019-08-22
 */
public interface UserVipMapper extends BaseMapper<UserVip> {
    /**
     * 获取用户Vip身份
     * @Author Shane
     * @Date 2019/8/2214:56
     * @param
     * @return
     **/
    UserVip getByUserId(@Param("userId") Integer userId);

    /**
     * 获取用户有效的vip身份
     * @Author Shane
     * @Date 2020/4/3 12:09
     * @param
     * @return
     */
    UserVip selectValidVip(@Param("userId") Integer userId);

    /**
     * 获取VIP用户信息
     * @Author Shane
     * @Date 2019/11/21 19:59
     * @param
     * @return
     **/
    IPage<Map<String, Object>> list(Page page, @Param("keyword") String keyword, @Param("beginTime") Date beginTime, @Param("endTime") Date endTime);

}